/*
 *  ActivityView
 *  created by qinghong
 *  2016-7-13
 */

/*
 * 定制版Activity,需给定参数  text
 */

import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    ActivityIndicator
} from 'react-native';


export default class ActivityView extends Component {
    render() {
        const { text } = this.props;

        return (
            <View style={styles.container}>
                <ActivityIndicator style={styles.activity}/>
                <Text style={styles.text}>
                    {text}
                </Text>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center'
    },
    activity: {
        top: -30,
        justifyContent: 'center',
        alignItems: 'center'
    },
    text: {
        textAlign: 'center',
        top: -10
    }
});

